\ProvidesPackage{lp} % Literature Programming
\RequirePackage{color} % markup the presentation by colors
\openout 0 \jobname.c % Open the auxliary file to save a compilation unit
\openout 2 \jobname.h % Open the auxliary file to save a header unit
% initialize a count for the number of uses
\count0=0
% initialize a count for the number of uses
\count1=0

\newcommand{\printdef}[1]{ 
	\immediate\write 0 {struct #1 { int dummy; } ;}
} 
\newcommand{\printuse}[1]{ \advance\count0 by 1 % increment for the count
	\immediate\write 0 {struct #1 a\number\count0 ;}
	% immediate output otherwise the number is not incremented by 1
} 
\newcommand{\printimp}[1] { \advance\count1 by 1 % increment for the count
   \immediate\openout 4 \jobname\number\count1.h % Open the auxiliary header file for write
   \immediate\write 4 {struct #1 { int dummy; }; } 
   \immediate\closeout 4
   \immediate\write 0 {\string #include "\jobname\number\count1.h" }
}
\newcommand{\printexp}[1] { 
   \immediate\write 2 {struct #1 { int dummy; }; } 
}

% definition of a concept
\newcommand{\define}[2]{\printdef{#1}{\color{red} #2} } 

% usage of a concept
\newcommand{\use}[2]{\printuse{#1}\color{green} #2} 

% exportation of a concept
\newcommand{\export}[2]{\printexp{#1}{\color{cyan} #2} }

% importation of a concept
\newcommand{\import}[2]{\printimp{#1}{\color{yellow} #2} }

% marker's comments
\newcommand{\meta}[1]{\footnote{\color{red} #1}} 
